#ifndef BOARD_H
#define BOARD_H

#include <QApplication>
#include <QWidget>
#include <QPainter>
#include <QPushButton>
#include <QGridLayout>
#include <QMainWindow>
#include <QPalette>
#include <QPrinter>
#include <QtGui>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QCloseEvent>
#include "logo.h"
#include "tabwidget.h"
#include "tabuser.h"
#include "tabamm.h"
#include "legami.h"
#include "businessaccount.h"
#include "executiveaccount.h"

class Board : public QWidget
{
    Q_OBJECT
public:
    Board(QWidget*p=0);
    ~Board();
    void closeEvent(QCloseEvent*);

private:
    QSqlDatabase db;

protected:  //non avendo Board classi derivate, e' a tutti gli effetti un campo private!
    QPushButton *close;
    QPushButton* amm;
    QPushButton* user;
    bool user_amm;      //0= user, 1=amm
    QGroupBox* hgc;
    QGroupBox* hgl;
    Tabwidget* tabbed;
    Tab* tab;
    Logo* logo;
    Legami* gestore;
    //metodi qui sotto son public!!
    void horizontal_bar_logo();
    void horizontal_bar_choice();
    void init_db() throw(logic_error, database_error, wrongdatabase_error);

public slots:
    void tabba_user();
    void tabba_amm();
};
#endif //BOARD_H
